home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************************************
-
-
- File: GraphAccelFKey.c
- Date: Wednesday, February 22, 1989 2:48:09 PM
-
- ________________________
-
-
- Copyright Apple Computer, Inc. 1988-1989. All Rights Reserved.
- Reproduction or distribution in any form without written permission is
- prohibitted.
-
-
- Sample 'FKEY' resource demonstarting how to turn acceleration on and off.
- After compiling this code it is necessary to link with GraphAccel.o.
-
- ************************************************************************************************/
-
-
- #include <OSUtils.h>
- #include "GraphAccel.h"
-
-
-
- pascal void
- GCFkey()
-
- {
-
- int res;
-
-
-
- if ( (res=GCStatus()) == 1 ) { /* acceleration is on */
- if ( GCAcceleration(0) < 0 ) /* let turn it off */
- Error(res);
- } else if ( res == 0 ) { /* when it is off */
- if ( GCAcceleration(1) < 0 ) /* turn it on */
- Error(res);
- } else
- Error(res);
- }
-
-
-
- Error(int num)
- {
- if ( num )
- ; /* some error ... */
- SysBeep(1); /* make some sound and exit */
- }
-
-